<!DOCTYPE html>
<html lang="en">

<head>
    <title></title>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width,initial-scale=1,user-scalable=0">
    <link rel="stylesheet" href="../res/css/weui.css" />
    <link rel="stylesheet" href="../res/css/weuix.css" />
    <link rel="stylesheet" href="../res//css/common.css">
    <link rel="stylesheet" href="../res/css/swiper.css">
    <script src="../res/js/zepto.min.js"></script>
    <script src="../res/js/zepto.weui.js"></script>
    <script src="../res/js/common.js?v=1"></script>
    <script src="../res/js/swiper.js"></script>
</head>
<script>
    $("#btnBack").click(function () {
        goPageNo(-1)
    })
</script>
<style>
    .fix-top {
        border-bottom: 1px solid #e8e8e8;
        position: fixed;
        left: 0;
        top: 0;
        right: 0;
        z-index: 1;
        background: #F6F6F9
    }

    body {
        background-color: #f9f8fe;
    }

    .wrappar {
        width: 90%;
        margin: 30px 5%;
        background-color: white;
        background: #FFFFFF;
        border-radius: 5px;
        margin-top: 60px;
    }

    .wrappar div {
        padding: 15px 10px;
        font-size: 15px;
        font-family: PingFang SC;
        font-weight: 500;
        color: #353535;
        display: flex;
    }

    .wrappar span:nth-child(1) {
        /* width: 30%; */
        text-align-last: justify;
    }
</style>
<script>
    var logId = getQst("logId")
    var userInfo = {}
    //获取详情信息
    function getUserInfo() {
        var params = {
            "id": logId
        }
        newAjaxPost("/h5/inquiryLog/getAllInfo", params, getUserInfoOk);
    }

    //获取到消息
    function getUserInfoOk(json) {
        //患者名称
        userInfo.patientName = json.data.patientName;
        //患者年龄
        userInfo.patientAge = json.data.patientAge;
        //问诊方式
        userInfo.paymentMethod = "自费缴费";
        //过敏记录
        json.data.patientAllergyDetails ? userInfo.patientAllergyDetails = json.data.patientAllergyDetails : userInfo
            .patientAllergyDetails = "无";
        //既往病史
        json.data.historyPresentIllness ? userInfo.historyPresentIllness = json.data.historyPresentIllness : userInfo
            .historyPresentIllness = "无";
        //特殊状况
        json.data.isChildOption ? userInfo.isChildOption = json.data.isChildOption : userInfo
            .isChildOption = "无";
        //性别
        json.data.patientSex == 1 ? userInfo.patientSex = "男" : userInfo.patientSex = "女";

        console.log(userInfo);

        let comtent = `
        <div><span>问 诊 用 户：</span><span>${userInfo.patientName}</span></div>
        <div><span>付 费 方 式：</span><span>${userInfo.paymentMethod}</span></div>
        <div><span>性 别：</span><span>${userInfo.patientSex}</span></div>
        <div><span>年 龄：</span><span>${userInfo.patientAge}</span></div>
        <div><span>药物过敏史：</span><span>${userInfo.patientAllergyDetails}</span></div>
        <div><span>既 往 病 史：</span><span>${userInfo.historyPresentIllness}</span></div>
        <div><span>特 殊 情 况：</span><span>${userInfo.isChildOption}</span></div>`

        $(".wrappar").html(comtent)
    }
    $(function () {
        $("#btnBack").click(() => {
            goPageNo(-1)
        })
        getUserInfo()
    })
</script>

<body>
    <div class="fix-top" style="z-index: 100;">
        <div class="weui-btn_primary weui-header">
            <div class="weui-header-left"><a id="btnBack" class="icon icon-109"></a></div>
            <h1 class="weui-header-title">就诊人详情</h1>
            <div class="weui-header-right;"></div>
        </div>
    </div>
    <div class="wrappar">

    </div>
</body>

</html>